import { IParam } from '@/core';
import { {{pascalCase appEntity.codeName}}ServiceBase } from './{{spinalCase appEntity.codeName}}-service-base';

/**
 * {{appEntity.logicName}}服务
 * 基于template/src/api/\{{appEntities}}/data-service/\{{appEntities}}-service.ts.hbs生成
 *
 * @export
 * @class {{pascalCase appEntity.codeName}}Service
 * @extends {{pascalCase appEntity.codeName}}ServiceBase
 */
export class {{pascalCase appEntity.codeName}}Service extends {{pascalCase appEntity.codeName}}ServiceBase {

    /**
     * 基础数据服务实例
     * 
     * @private
     * @type { {{pascalCase appEntity.codeName}}Service }
     * @memberof {{pascalCase appEntity.codeName}}Service
     */
    private static basicDataServiceInstance: {{pascalCase appEntity.codeName}}Service;

    /**
     * 数据服务存储Map对象
     *
     * @private
     * @type {Map<string, any>}
     * @memberof {{pascalCase appEntity.codeName}}Service
     */
    private static dataServiceMap: Map<string, any> = new Map();

    /**
     * Creates an instance of {{pascalCase appEntity.codeName}}Service.
     * @memberof {{pascalCase appEntity.codeName}}Service
     */
    constructor(opts?: IParam) {
        super(opts);
    }

    /**
     * 获取实例
     *
     * @static
     * @param 应用上下文
     * @return {*}  { {{pascalCase appEntity.codeName}}Service }
     * @memberof {{pascalCase appEntity.codeName}}Service
     */
    static getInstance(opts?: IParam): {{pascalCase appEntity.codeName}}Service {
        if (!this.basicDataServiceInstance) {
            this.basicDataServiceInstance = new {{pascalCase appEntity.codeName}}Service(opts);
        }
        return this.basicDataServiceInstance;
    }
}
export default {{pascalCase appEntity.codeName}}Service;